package edu.zut.hys.jsskateboard;

import edu.zut.hys.jsskateboard.util.UtilServiceAbility;
import ohos.aafwk.content.Intent;
import ohos.ace.ability.AceAbility;
import ohos.security.SystemPermission;

/**
 * MainAbility
 */
public class MainAbility extends AceAbility {
    @Override
    public void onStart(Intent intent) {
        requestPermissionsFromUser(new String[]{SystemPermission.READ_USER_STORAGE,SystemPermission.LOCATION,
                SystemPermission.WRITE_USER_STORAGE, SystemPermission.CAMERA,SystemPermission.MICROPHONE},1123);
        super.onStart(intent);
        StaticV.context = this;
        UtilServiceAbility.getInstance().register(this);
    }

    @Override
    public void onStop() {
        super.onStop();
        UtilServiceAbility.getInstance().deregister(this);
    }
}
